<template>
    <div>
        <h2>ChildOne - childone - 子组件1</h2>
        <h2>word -- {{word}}</h2>
        <p>
            <input type="text" v-model="word">
        </p>
        <h1>price == {{price}}</h1>
        <div v-if="show">
            <h2 v-for="(l,i) in list" :key="i">{{l}}</h2>
        </div>
    </div>
</template>

<script>
import word from "@/utils"
export default {
    props:{
        show:Boolean,
        price:Number,
    },
    data(){
        return {
            list:["Vue","Vue3.0","React","Node","More"],
            word
        }
    },
    mounted() {
        this.$bus.$on("changeByBus",w=>{
            this.word = w;
        })
    },
}
</script>